#include  <iostream>
#include  <vector>
using namespace std;

void swap(int *a, int *b)
{
	int temp = *a;
	*a = *b;
	*b = temp;
}

int partition(vector<int>& arr, int p, int r)
{
	int x = arr[r];
	int i = p, j = r-1;

	while( i < j )
	{
		for( ; i < j && arr[i] < x ; ++i);
		for( ; i < j && arr[j] >= x; --j);

		if( i >= j )
			break;

		swap(&arr[i++],&arr[j--]);
	}

	if( arr[i] >= x )
	{
		swap(&arr[i], &arr[r]);
	}
	else
	{
		swap(&arr[++i], &arr[r]);
	}

	return i;
}

void _qsort(vector<int>& arr, int p, int r)
{
	if( p >= r )
		return;

	int q = partition(arr,p,r);
	_qsort(arr,p,q-1);
	_qsort(arr,q+1,r);
}

void quick_sort(vector<int>& arr, size_t n)
{
	if( n == 1 )
	{
		return;
	}
	else
	{
		int q = partition(arr,0,n-1);
		_qsort(arr,0,q-1);
		_qsort(arr,q+1,n-1);
	}

	return;
}

int main(int argc, char *argv[])
{
	vector<int> a;
	int n;

	while( cin >> n && n != 0 )
	{
		a.push_back(n);
	}

	quick_sort(a,a.size());

	for( int i = 0 ; i < a.size()  ; ++i )
	{
		cout << a[i] << " " ;
	}
	
	cout << endl;
}
